﻿using System;
using System.Web.UI;

namespace MyLib.Web.UI {
	/// <summary>
	/// 
	/// </summary>
	[ToolboxData("<{0}:MyEmailValidator runat=\"server\"></{0}:MyEmailValidator>")]
	public sealed class MyEmailValidator : MyFormatBaseValidator {
		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		protected override string GetExpression() {
			return @"[a-zA-Z0-9]([a-zA-Z0-9]*[-_]?[a-zA-Z0-9]+)*@([a-zA-Z0-9]*[-_]?[a-zA-Z0-9]+)+[\.][a-zA-Z]{2,3}([\.][a-zA-Z]{2})?";
		}
	} // end of MyEmailValidator.
}
